<{strip}>
			 <!--  sidear start -->
  <div id="sidebar" role="complementary">
                    <!-- Search Start -->
                    <div id="search">
                        <form method="post" id="searchform" action="<{spUrl c=main a=search}>">
                            <span class="st">
                                <input type="text" value="" name="s" id="s" class="searchtxt" />
                            </span><span class="ss">
                                <input type="submit" name="submit" value="" class="searchsm"  onclick="javascript: return document.getElementById('s').value!='';"/>
                            </span>
                        </form>
                    </div>
                    <div class="clear"></div>
                    <!-- Search End -->
                    <ul>
                        <li id="meta-2" class="widget widget_meta">
                            <h2 class="widgettitle">用户</h2>
                            <ul>
                                <{if $userinfo eq true}>
                                <li>欢迎你：<{$userinfo.screenname}></li>
                                <li>上次登录：<{$userinfo.lastlogin}></li>
                                <li>登录次数：<{$userinfo.logincount}></li>

                                <li><a href="<{spUrl c=post a=write}>">发表文章</a> &nbsp;&nbsp;  &nbsp;&nbsp;<a href="<{spUrl c=admin a=index}>">管理</a>  </li>
                                <li><a href="<{spUrl c=admin a=logout}>">登出</a></li>
                                <{else}>
                                <li><a href="#" class="userlogin">登录</a></li>
                                <{/if}>
                            </ul>
                        </li>
                        <li id="categories-2" class="widget widget_categories">
                            <h2 class="widgettitle">分类目录</h2>
                            <ul>
                                <{foreach item=item from=$category}>
                                <li class="cat-item cat-item-4"><{$item.leftpad}><a href="<{spUrl c=main a=category id=$item.id}>" title="查看<{$item.dispname}>下的所有文章"><{$item.name}></a> </li>
                                <{/foreach}>
                            </ul>
                        </li>
                        <li id="recent-posts-2" class="widget widget_recent_entries">
                            <h2 class="widgettitle">近期文章</h2>
                            <ul>
                                <{foreach item=item from=$topnews}>
                                <li><a href="#" title="<{$item.title}>" onclick="return checkacl(<{$item.id}>);"><{$item.title}></a></li>
                                <{/foreach}>
                            </ul>
                        </li>
                        <li id="recent-comments-2" class="widget widget_recent_comments">
                            <h2 class="widgettitle">近期评论</h2>
                            <ul id="recentcomments">
                                <{foreach item=item from=$topcomments}>
                                <li class="recentcomments"><{$item.screenname}>发表在《<a href="#" onclick="return checkacl(<{$item.id}>);"><{$item.title}></a>》</li>
                                <{/foreach}>
                            </ul>
                        </li>
                        <li id="archives-2" class="widget widget_archive">
                            <h2 class="widgettitle">文章归档</h2>
                            <ul>
                                <{foreach item=item from=$archive}>
                                <li><a href='<{spUrl c=main a=archive d=$item.created}>' title='<{$item.created}>'><{$item.created}>(<{$item.postcount}>)</a></li>
                                <{/foreach}>
                            </ul>
                        </li>
                        <li id="text-2" class="widget widget_text">
                            <h2 class="widgettitle">背景音乐</h2>
                            <div class="textwidget">
							<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="165" height="40" id="niftyPlayer1" align="">
		 <param name=movie value="/attached/media/niftyplayer.swf?file=/attached/media/<{'1'|rand:'2'}>.mp3&as=1">
		 <param name=quality value=high>
		 <embed src="/attached/media/niftyplayer.swf?file=/attached/media/<{'1'|rand:'2'}>.mp3&as=1" quality=high bgcolor=#FFFFFF width="165" height="40" name="niftyPlayer1" align="" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer">
		</embed>
		</object>
                            </div>
                        </li>
                        <li id="archives-2" class="widget widget_archive">
                            <h2 class="widgettitle">友情链接</h2>
                            <ul><li><a href="http://www.usst.edu.cn" target="_BLANK">上海理工大学</a></li>
							</ul>
                        </li>

                    </ul>
                </div>   <!-- end sidebar  -->

				 <script type="text/javascript">
   function checkacl(id){
			$.post("<{spUrl c=main a=checkacl}>",{},function(msg){
				if (msg.msg=="OK")
				{
				window.location.href="/index.php?c=main&a=article&id="+id;
				}
				else
				{
		  alert('您需要登录后才能访问！');
				return false;
				}
				}
		,'json');
   }
 </script>
				<{/strip}>